package com.ruoyi.xiche.controller;

//import com.ruoyi.xiche.dto.OrderDetailDTO;
import com.ruoyi.xiche.domain.OrderDetailDTO;
import com.ruoyi.xiche.domain.ServiceReview;
import com.ruoyi.xiche.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;

@RestController
@RequestMapping("/order")
public class OrderController {

    @Autowired
    private OrderService orderService;

    //获取评价和一大堆东西
    @GetMapping("/getOrderDetails")
    public List<OrderDetailDTO> getOrderDetails() {
        return orderService.getOrderDetails();
    }

    //获取某个商店的评价
    @GetMapping("/getOrderDetailsByStoreId")
    public List<OrderDetailDTO> getOrderDetailsByStoreId(int storeId) {
        return orderService.getOrderDetailsByStoreId(storeId);
    }
}
